import sqlite3
conn = sqlite3.connect("data/test.db")
cursor = conn.cursor()
stock_tuple = (('601288', '农业银行', 3.16),
               ('601398', '工商银行', 4.94),
               ('601939', '建设银行', 6.19))
insert_sql = "insert into stocks values(?,?,?)"
cursor.executemany(insert_sql, stock_tuple)
conn.commit()

result = cursor.execute("SELECT * FROM stocks")
for row in result:
    print(row)
cursor.close()
conn.close()